﻿using DAL.Base;
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL.Base
{
   public class CodeBLL
    {
        private readonly CodeDAL _codeDal;
        public CodeBLL()
        {
            _codeDal = new CodeDAL();
        }
        /// <summary>
        /// 根据编码名称(Name)获取编码内容
        /// </summary>
        /// <param name="name">编码名称 Name</param>
        /// <returns></returns>
        public List<CodeModel> GetArea(string name)
        {
            return _codeDal.GetArea(name);
        }

        /// <summary>
        /// 新增编码
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddCode(CodeModel model)
        {
            return _codeDal.AddCode(model);
        }

    }
}
